#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    int h, m, s, n;
    scanf("%d:%d:%d", &h, &m, &s);
    scanf("%d", &n);
    int sum = h * 3600 + m * 60 + s;
    sum = sum + n;
    if (sum >= 24 * 3600)
        sum -= 24 * 3600;
    h = sum / 3600;
    m = (sum - h * 3600) / 60;
    s = sum - h * 3600 - m * 60;
    printf("time: %d:%d:%d\n", h, m, s);
    return 0;
}